home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Source / GNU / cc / gcc.info-21 (.txt) < prev    next >
GNU Info File  |  1993-10-21  |  37KB  |  657 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License" and "Protect
  13. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  14. original, and provided that the entire resulting derived work is
  15. distributed under the terms of a permission notice identical to this
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that the sections entitled "GNU General Public
  19. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  20. permission notice, may be included in translations approved by the Free
  21. Software Foundation instead of in the original English.
  22. File: gcc.info,  Node: Macros for Initialization,  Next: Instruction Output,  Prev: Initialization,  Up: Assembler Format
  23. Macros Controlling Initialization Routines
  24. ------------------------------------------
  25.    Here are the macros that control how the compiler handles
  26. initialization and termination functions:
  27. `INIT_SECTION_ASM_OP'
  28.      If defined, a C string constant for the assembler operation to
  29.      identify the following data as initialization code.  If not
  30.      defined, GNU CC will assume such a section does not exist.  When
  31.      you are using special sections for initialization and termination
  32.      functions, this macro also controls how `crtstuff.c' and
  33.      `libgcc2.c' arrange to run the initialization functions.
  34. `ASM_OUTPUT_CONSTRUCTOR (STREAM, NAME)'
  35.      Define this macro as a C statement to output on the stream STREAM
  36.      the assembler code to arrange to call the function named NAME at
  37.      initialization time.
  38.      Assume that NAME is the name of a C function generated
  39.      automatically by the compiler.  This function takes no arguments.
  40.      Use the function `assemble_name' to output the name NAME; this
  41.      performs any system-specific syntactic transformations such as
  42.      adding an underscore.
  43.      If you don't define this macro, nothing special is output to
  44.      arrange to call the function.  This is correct when the function
  45.      will be called in some other manner--for example, by means of the
  46.      `collect2' program, which looks through the symbol table to find
  47.      these functions by their names.
  48. `ASM_OUTPUT_DESTRUCTOR (STREAM, NAME)'
  49.      This is like `ASM_OUTPUT_CONSTRUCTOR' but used for termination
  50.      functions rather than initialization functions.
  51.    If your system uses `collect2' as the means of processing
  52. constructors, then that program normally uses `nm' to scan an object
  53. file for constructor functions to be called.  On certain kinds of
  54. systems, you can define these macros to make `collect2' work faster
  55. (and, in some cases, make it work at all):
  56. `OBJECT_FORMAT_COFF'
  57.      Define this macro if the system uses COFF (Common Object File
  58.      Format) object files, so that `collect2' can assume this format
  59.      and scan object files directly for dynamic constructor/destructor
  60.      functions.
  61. `OBJECT_FORMAT_ROSE'
  62.      Define this macro if the system uses ROSE format object files, so
  63.      that `collect2' can assume this format and scan object files
  64.      directly for dynamic constructor/destructor functions.
  65.    These macros are effective only in a native compiler; `collect2' as
  66. part of a cross compiler always uses `nm'.
  67. `REAL_NM_FILE_NAME'
  68.      Define this macro as a C string constant containing the file name
  69.      to use to execute `nm'.  The default is to search the path
  70.      normally for `nm'.
  71. File: gcc.info,  Node: Instruction Output,  Next: Dispatch Tables,  Prev: Macros for Initialization,  Up: Assembler Format
  72. Output of Assembler Instructions
  73. --------------------------------
  74. `REGISTER_NAMES'
  75.      A C initializer containing the assembler's names for the machine
  76.      registers, each one as a C string constant.  This is what
  77.      translates register numbers in the compiler into assembler
  78.      language.
  79. `ADDITIONAL_REGISTER_NAMES'
  80.      If defined, a C initializer for an array of structures containing
  81.      a name and a register number.  This macro defines additional names
  82.      for hard registers, thus allowing the `asm' option in declarations
  83.      to refer to registers using alternate names.
  84. `ASM_OUTPUT_OPCODE (STREAM, PTR)'
  85.      Define this macro if you are using an unusual assembler that
  86.      requires different names for the machine instructions.
  87.      The definition is a C statement or statements which output an
  88.      assembler instruction opcode to the stdio stream STREAM.  The
  89.      macro-operand PTR is a variable of type `char *' which points to
  90.      the opcode name in its "internal" form--the form that is written
  91.      in the machine description.  The definition should output the
  92.      opcode name to STREAM, performing any translation you desire, and
  93.      increment the variable PTR to point at the end of the opcode so
  94.      that it will not be output twice.
  95.      In fact, your macro definition may process less than the entire
  96.      opcode name, or more than the opcode name; but if you want to
  97.      process text that includes `%'-sequences to substitute operands,
  98.      you must take care of the substitution yourself.  Just be sure to
  99.      increment PTR over whatever text should not be output normally.
  100.      If you need to look at the operand values, they can be found as the
  101.      elements of `recog_operand'.
  102.      If the macro definition does nothing, the instruction is output in
  103.      the usual way.
  104. `FINAL_PRESCAN_INSN (INSN, OPVEC, NOPERANDS)'
  105.      If defined, a C statement to be executed just prior to the output
  106.      of assembler code for INSN, to modify the extracted operands so
  107.      they will be output differently.
  108.      Here the argument OPVEC is the vector containing the operands
  109.      extracted from INSN, and NOPERANDS is the number of elements of
  110.      the vector which contain meaningful data for this insn.  The
  111.      contents of this vector are what will be used to convert the insn
  112.      template into assembler code, so you can change the assembler
  113.      output by changing the contents of the vector.
  114.      This macro is useful when various assembler syntaxes share a single
  115.      file of instruction patterns; by defining this macro differently,
  116.      you can cause a large class of instructions to be output
  117.      differently (such as with rearranged operands).  Naturally,
  118.      variations in assembler syntax affecting individual insn patterns
  119.      ought to be handled by writing conditional output routines in
  120.      those patterns.
  121.      If this macro is not defined, it is equivalent to a null statement.
  122. `PRINT_OPERAND (STREAM, X, CODE)'
  123.      A C compound statement to output to stdio stream STREAM the
  124.      assembler syntax for an instruction operand X.  X is an RTL
  125.      expression.
  126.      CODE is a value that can be used to specify one of several ways of
  127.      printing the operand.  It is used when identical operands must be
  128.      printed differently depending on the context.  CODE comes from the
  129.      `%' specification that was used to request printing of the
  130.      operand.  If the specification was just `%DIGIT' then CODE is 0;
  131.      if the specification was `%LTR DIGIT' then CODE is the ASCII code
  132.      for LTR.
  133.      If X is a register, this macro should print the register's name.
  134.      The names can be found in an array `reg_names' whose type is `char
  135.      *[]'.  `reg_names' is initialized from `REGISTER_NAMES'.
  136.      When the machine description has a specification `%PUNCT' (a `%'
  137.      followed by a punctuation character), this macro is called with a
  138.      null pointer for X and the punctuation character for CODE.
  139. `PRINT_OPERAND_PUNCT_VALID_P (CODE)'
  140.      A C expression which evaluates to true if CODE is a valid
  141.      punctuation character for use in the `PRINT_OPERAND' macro.  If
  142.      `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no
  143.      punctuation characters (except for the standard one, `%') are used
  144.      in this way.
  145. `PRINT_OPERAND_ADDRESS (STREAM, X)'
  146.      A C compound statement to output to stdio stream STREAM the
  147.      assembler syntax for an instruction operand that is a memory
  148.      reference whose address is X.  X is an RTL expression.
  149.      On some machines, the syntax for a symbolic address depends on the
  150.      section that the address refers to.  On these machines, define the
  151.      macro `ENCODE_SECTION_INFO' to store the information into the
  152.      `symbol_ref', and then check for it here.  *Note Assembler
  153.      Format::.
  154. `DBR_OUTPUT_SEQEND(FILE)'
  155.      A C statement, to be executed after all slot-filler instructions
  156.      have been output.  If necessary, call `dbr_sequence_length' to
  157.      determine the number of slots filled in a sequence (zero if not
  158.      currently outputting a sequence), to decide how many no-ops to
  159.      output, or whatever.
  160.      Don't define this macro if it has nothing to do, but it is helpful
  161.      in reading assembly output if the extent of the delay sequence is
  162.      made explicit (e.g. with white space).
  163.      Note that output routines for instructions with delay slots must be
  164.      prepared to deal with not being output as part of a sequence (i.e.
  165.      when the scheduling pass is not run, or when no slot fillers could
  166.      be found.)  The variable `final_sequence' is null when not
  167.      processing a sequence, otherwise it contains the `sequence' rtx
  168.      being output.
  169. `REGISTER_PREFIX'
  170. `LOCAL_LABEL_PREFIX'
  171. `USER_LABEL_PREFIX'
  172. `IMMEDIATE_PREFIX'
  173.      If defined, C string expressions to be used for the `%R', `%L',
  174.      `%U', and `%I' options of `asm_fprintf' (see `final.c').  These
  175.      are useful when a single `md' file must support multiple assembler
  176.      formats.  In that case, the various `tm.h' files can define these
  177.      macros differently.
  178. `ASSEMBLER_DIALECT'
  179.      If your target supports multiple dialects of assembler language
  180.      (such as different opcodes), define this macro as a C expression
  181.      that gives the numeric index of the assembler langauge dialect to
  182.      use, with zero as the first variant.
  183.      When this macro is defined, you may include strings of the form
  184.      `{option0|option1|option2}' within output templates (*note Output
  185.      Template::.) or the operand to `asm_fprintf'.  GNU CC will output
  186.      either `option0', `option1' or `option2' if the value of
  187.      `ASSEMBLER_DIALECT' is zero, one or two, respectively.  Any
  188.      special characters within these strings retain their usual meaning.
  189.      If you do not define this macro, the characters `{', `|' and `}'
  190.      do not have any special meaning when used in templates or operands
  191.      to `asm_fprintf'.
  192.      Define the `REGISTER_PREFIX', `LOCAL_LABEL_PREFIX',
  193.      `USER_LABEL_PREFIX' and `IMMEDIATE_PREFIX' macros above if you can
  194.      express the variations in assemble language syntax with that
  195.      mechanism.  Define `ASSEMBLER_DIALECT' and use the
  196.      `{option0|option1}' syntax if the syntax variant are larger and
  197.      involve such things as different opcodes or operand order.
  198. `ASM_OUTPUT_REG_PUSH (STREAM, REGNO)'
  199.      A C expression to output to STREAM some assembler code which will
  200.      push hard register number REGNO onto the stack.  The code need not
  201.      be optimal, since this macro is used only when profiling.
  202. `ASM_OUTPUT_REG_POP (STREAM, REGNO)'
  203.      A C expression to output to STREAM some assembler code which will
  204.      pop hard register number REGNO off of the stack.  The code need
  205.      not be optimal, since this macro is used only when profiling.
  206. File: gcc.info,  Node: Dispatch Tables,  Next: Alignment Output,  Prev: Instruction Output,  Up: Assembler Format
  207. Output of Dispatch Tables
  208. -------------------------
  209. `ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, VALUE, REL)'
  210.      This macro should be provided on machines where the addresses in a
  211.      dispatch table are relative to the table's own address.
  212.      The definition should be a C statement to output to the stdio
  213.      stream STREAM an assembler pseudo-instruction to generate a
  214.      difference between two labels.  VALUE and REL are the numbers of
  215.      two internal labels.  The definitions of these labels are output
  216.      using `ASM_OUTPUT_INTERNAL_LABEL', and they must be printed in the
  217.      same way here.  For example,
  218.           fprintf (STREAM, "\t.word L%d-L%d\n",
  219.                    VALUE, REL)
  220. `ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)'
  221.      This macro should be provided on machines where the addresses in a
  222.      dispatch table are absolute.
  223.      The definition should be a C statement to output to the stdio
  224.      stream STREAM an assembler pseudo-instruction to generate a
  225.      reference to a label.  VALUE is the number of an internal label
  226.      whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'.  For
  227.      example,
  228.           fprintf (STREAM, "\t.word L%d\n", VALUE)
  229. `ASM_OUTPUT_CASE_LABEL (STREAM, PREFIX, NUM, TABLE)'
  230.      Define this if the label before a jump-table needs to be output
  231.      specially.  The first three arguments are the same as for
  232.      `ASM_OUTPUT_INTERNAL_LABEL'; the fourth argument is the jump-table
  233.      which follows (a `jump_insn' containing an `addr_vec' or
  234.      `addr_diff_vec').
  235.      This feature is used on system V to output a `swbeg' statement for
  236.      the table.
  237.      If this macro is not defined, these labels are output with
  238.      `ASM_OUTPUT_INTERNAL_LABEL'.
  239. `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)'
  240.      Define this if something special must be output at the end of a
  241.      jump-table.  The definition should be a C statement to be executed
  242.      after the assembler code for the table is written.  It should write
  243.      the appropriate code to stdio stream STREAM.  The argument TABLE
  244.      is the jump-table insn, and NUM is the label-number of the
  245.      preceding label.
  246.      If this macro is not defined, nothing special is output at the end
  247.      of the jump-table.
  248. File: gcc.info,  Node: Alignment Output,  Prev: Dispatch Tables,  Up: Assembler Format
  249. Assembler Commands for Alignment
  250. --------------------------------
  251. `ASM_OUTPUT_ALIGN_CODE (FILE)'
  252.      A C expression to output text to align the location counter in the
  253.      way that is desirable at a point in the code that is reached only
  254.      by jumping.
  255.      This macro need not be defined if you don't want any special
  256.      alignment to be done at such a time.  Most machine descriptions do
  257.      not currently define the macro.
  258. `ASM_OUTPUT_LOOP_ALIGN (FILE)'
  259.      A C expression to output text to align the location counter in the
  260.      way that is desirable at the beginning of a loop.
  261.      This macro need not be defined if you don't want any special
  262.      alignment to be done at such a time.  Most machine descriptions do
  263.      not currently define the macro.
  264. `ASM_OUTPUT_SKIP (STREAM, NBYTES)'
  265.      A C statement to output to the stdio stream STREAM an assembler
  266.      instruction to advance the location counter by NBYTES bytes.
  267.      Those bytes should be zero when loaded.  NBYTES will be a C
  268.      expression of type `int'.
  269. `ASM_NO_SKIP_IN_TEXT'
  270.      Define this macro if `ASM_OUTPUT_SKIP' should not be used in the
  271.      text section because it fails put zeros in the bytes that are
  272.      skipped.  This is true on many Unix systems, where the pseudo-op
  273.      to skip bytes produces no-op instructions rather than zeros when
  274.      used in the text section.
  275. `ASM_OUTPUT_ALIGN (STREAM, POWER)'
  276.      A C statement to output to the stdio stream STREAM an assembler
  277.      command to advance the location counter to a multiple of 2 to the
  278.      POWER bytes.  POWER will be a C expression of type `int'.
  279. File: gcc.info,  Node: Debugging Info,  Next: Cross-compilation,  Prev: Assembler Format,  Up: Target Macros
  280. Controlling Debugging Information Format
  281. ========================================
  282. * Menu:
  283. * All Debuggers::      Macros that affect all debugging formats uniformly.
  284. * DBX Options::        Macros enabling specific options in DBX format.
  285. * DBX Hooks::          Hook macros for varying DBX format.
  286. * File Names and DBX:: Macros controlling output of file names in DBX format.
  287. * SDB and DWARF::      Macros for SDB (COFF) and DWARF formats.
  288. File: gcc.info,  Node: All Debuggers,  Next: DBX Options,  Up: Debugging Info
  289. Macros Affecting All Debugging Formats
  290. --------------------------------------
  291. `DBX_REGISTER_NUMBER (REGNO)'
  292.      A C expression that returns the DBX register number for the
  293.      compiler register number REGNO.  In simple cases, the value of this
  294.      expression may be REGNO itself.  But sometimes there are some
  295.      registers that the compiler knows about and DBX does not, or vice
  296.      versa.  In such cases, some register may need to have one number in
  297.      the compiler and another for DBX.
  298.      If two registers have consecutive numbers inside GNU CC, and they
  299.      can be used as a pair to hold a multiword value, then they *must*
  300.      have consecutive numbers after renumbering with
  301.      `DBX_REGISTER_NUMBER'.  Otherwise, debuggers will be unable to
  302.      access such a pair, because they expect register pairs to be
  303.      consecutive in their own numbering scheme.
  304.      If you find yourself defining `DBX_REGISTER_NUMBER' in way that
  305.      does not preserve register pairs, then what you must do instead is
  306.      redefine the actual register numbering scheme.
  307. `DEBUGGER_AUTO_OFFSET (X)'
  308.      A C expression that returns the integer offset value for an
  309.      automatic variable having address X (an RTL expression).  The
  310.      default computation assumes that X is based on the frame-pointer
  311.      and gives the offset from the frame-pointer.  This is required for
  312.      targets that produce debugging output for DBX or COFF-style
  313.      debugging output for SDB and allow the frame-pointer to be
  314.      eliminated when the `-g' options is used.
  315. `DEBUGGER_ARG_OFFSET (OFFSET, X)'
  316.      A C expression that returns the integer offset value for an
  317.      argument having address X (an RTL expression).  The nominal offset
  318.      is OFFSET.
  319. `PREFERRED_DEBUGGING_TYPE'
  320.      A C expression that returns the type of debugging output GNU CC
  321.      produces when the user specifies `-g' or `-ggdb'.  Define this if
  322.      you have arranged for GNU CC to support more than one format of
  323.      debugging output.  Currently, the allowable values are `DBX_DEBUG',
  324.      `SDB_DEBUG', `DWARF_DEBUG', and `XCOFF_DEBUG'.
  325.      The value of this macro only affects the default debugging output;
  326.      the user can always get a specific type of output by using
  327.      `-gstabs', `-gcoff', `-gdwarf', or `-gxcoff'.
  328. File: gcc.info,  Node: DBX Options,  Next: DBX Hooks,  Prev: All Debuggers,  Up: Debugging Info
  329. Specific Options for DBX Output
  330. -------------------------------
  331. `DBX_DEBUGGING_INFO'
  332.      Define this macro if GNU CC should produce debugging output for DBX
  333.      in response to the `-g' option.
  334. `XCOFF_DEBUGGING_INFO'
  335.      Define this macro if GNU CC should produce XCOFF format debugging
  336.      output in response to the `-g' option.  This is a variant of DBX
  337.      format.
  338. `DEFAULT_GDB_EXTENSIONS'
  339.      Define this macro to control whether GNU CC should by default
  340.      generate GDB's extended version of DBX debugging information
  341.      (assuming DBX-format debugging information is enabled at all).  If
  342.      you don't define the macro, the default is 1: always generate the
  343.      extended information if there is any occasion to.
  344. `DEBUG_SYMS_TEXT'
  345.      Define this macro if all `.stabs' commands should be output while
  346.      in the text section.
  347. `ASM_STABS_OP'
  348.      A C string constant naming the assembler pseudo op to use instead
  349.      of `.stabs' to define an ordinary debugging symbol.  If you don't
  350.      define this macro, `.stabs' is used.  This macro applies only to
  351.      DBX debugging information format.
  352. `ASM_STABD_OP'
  353.      A C string constant naming the assembler pseudo op to use instead
  354.      of `.stabd' to define a debugging symbol whose value is the current
  355.      location.  If you don't define this macro, `.stabd' is used.  This
  356.      macro applies only to DBX debugging information format.
  357. `ASM_STABN_OP'
  358.      A C string constant naming the assembler pseudo op to use instead
  359.      of `.stabn' to define a debugging symbol with no name.  If you
  360.      don't define this macro, `.stabn' is used.  This macro applies
  361.      only to DBX debugging information format.
  362. `DBX_NO_XREFS'
  363.      Define this macro if DBX on your system does not support the
  364.      construct `xsTAGNAME'.  On some systems, this construct is used to
  365.      describe a forward reference to a structure named TAGNAME.  On
  366.      other systems, this construct is not supported at all.
  367. `DBX_CONTIN_LENGTH'
  368.      A symbol name in DBX-format debugging information is normally
  369.      continued (split into two separate `.stabs' directives) when it
  370.      exceeds a certain length (by default, 80 characters).  On some
  371.      operating systems, DBX requires this splitting; on others,
  372.      splitting must not be done.  You can inhibit splitting by defining
  373.      this macro with the value zero.  You can override the default
  374.      splitting-length by defining this macro as an expression for the
  375.      length you desire.
  376. `DBX_CONTIN_CHAR'
  377.      Normally continuation is indicated by adding a `\' character to
  378.      the end of a `.stabs' string when a continuation follows.  To use
  379.      a different character instead, define this macro as a character
  380.      constant for the character you want to use.  Do not define this
  381.      macro if backslash is correct for your system.
  382. `DBX_STATIC_STAB_DATA_SECTION'
  383.      Define this macro if it is necessary to go to the data section
  384.      before outputting the `.stabs' pseudo-op for a non-global static
  385.      variable.
  386. `DBX_TYPE_DECL_STABS_CODE'
  387.      The value to use in the "code" field of the `.stabs' directive for
  388.      a typedef.  The default is `N_LSYM'.
  389. `DBX_STATIC_CONST_VAR_CODE'
  390.      The value to use in the "code" field of the `.stabs' directive for
  391.      a static variable located in the text section.  DBX format does not
  392.      provide any "right" way to do this.  The default is `N_FUN'.
  393. `DBX_REGPARM_STABS_CODE'
  394.      The value to use in the "code" field of the `.stabs' directive for
  395.      a parameter passed in registers.  DBX format does not provide any
  396.      "right" way to do this.  The default is `N_RSYM'.
  397. `DBX_REGPARM_STABS_LETTER'
  398.      The letter to use in DBX symbol data to identify a symbol as a
  399.      parameter passed in registers.  DBX format does not customarily
  400.      provide any way to do this.  The default is `'P''.
  401. `DBX_MEMPARM_STABS_LETTER'
  402.      The letter to use in DBX symbol data to identify a symbol as a
  403.      stack parameter.  The default is `'p''.
  404. `DBX_FUNCTION_FIRST'
  405.      Define this macro if the DBX information for a function and its
  406.      arguments should precede the assembler code for the function.
  407.      Normally, in DBX format, the debugging information entirely
  408.      follows the assembler code.
  409. `DBX_LBRAC_FIRST'
  410.      Define this macro if the `N_LBRAC' symbol for a block should
  411.      precede the debugging information for variables and functions
  412.      defined in that block.  Normally, in DBX format, the `N_LBRAC'
  413.      symbol comes first.
  414. File: gcc.info,  Node: DBX Hooks,  Next: File Names and DBX,  Prev: DBX Options,  Up: Debugging Info
  415. Open-Ended Hooks for DBX Format
  416. -------------------------------
  417. `DBX_OUTPUT_LBRAC (STREAM, NAME)'
  418.      Define this macro to say how to output to STREAM the debugging
  419.      information for the start of a scope level for variable names.  The
  420.      argument NAME is the name of an assembler symbol (for use with
  421.      `assemble_name') whose value is the address where the scope begins.
  422. `DBX_OUTPUT_RBRAC (STREAM, NAME)'
  423.      Like `DBX_OUTPUT_LBRAC', but for the end of a scope level.
  424. `DBX_OUTPUT_ENUM (STREAM, TYPE)'
  425.      Define this macro if the target machine requires special handling
  426.      to output an enumeration type.  The definition should be a C
  427.      statement (sans semicolon) to output the appropriate information
  428.      to STREAM for the type TYPE.
  429. `DBX_OUTPUT_FUNCTION_END (STREAM, FUNCTION)'
  430.      Define this macro if the target machine requires special output at
  431.      the end of the debugging information for a function.  The
  432.      definition should be a C statement (sans semicolon) to output the
  433.      appropriate information to STREAM.  FUNCTION is the
  434.      `FUNCTION_DECL' node for the function.
  435. `DBX_OUTPUT_STANDARD_TYPES (SYMS)'
  436.      Define this macro if you need to control the order of output of the
  437.      standard data types at the beginning of compilation.  The argument
  438.      SYMS is a `tree' which is a chain of all the predefined global
  439.      symbols, including names of data types.
  440.      Normally, DBX output starts with definitions of the types for
  441.      integers and characters, followed by all the other predefined
  442.      types of the particular language in no particular order.
  443.      On some machines, it is necessary to output different particular
  444.      types first.  To do this, define `DBX_OUTPUT_STANDARD_TYPES' to
  445.      output those symbols in the necessary order.  Any predefined types
  446.      that you don't explicitly output will be output afterward in no
  447.      particular order.
  448.      Be careful not to define this macro so that it works only for C.
  449.      There are no global variables to access most of the built-in
  450.      types, because another language may have another set of types.
  451.      The way to output a particular type is to look through SYMS to see
  452.      if you can find it.  Here is an example:
  453.           {
  454.             tree decl;
  455.             for (decl = syms; decl; decl = TREE_CHAIN (decl))
  456.               if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)),
  457.                            "long int"))
  458.                 dbxout_symbol (decl);
  459.             ...
  460.           }
  461.      This does nothing if the expected type does not exist.
  462.      See the function `init_decl_processing' in `c-decl.c' to find the
  463.      names to use for all the built-in C types.
  464.      Here is another way of finding a particular type:
  465.           {
  466.             tree decl;
  467.             for (decl = syms; decl; decl = TREE_CHAIN (decl))
  468.               if (TREE_CODE (decl) == TYPE_DECL
  469.                   && (TREE_CODE (TREE_TYPE (decl))
  470.                       == INTEGER_CST)
  471.                   && TYPE_PRECISION (TREE_TYPE (decl)) == 16
  472.                   && TYPE_UNSIGNED (TREE_TYPE (decl)))
  473.           /* This must be `unsigned short'.  */
  474.                 dbxout_symbol (decl);
  475.             ...
  476.           }
  477. File: gcc.info,  Node: File Names and DBX,  Next: SDB and DWARF,  Prev: DBX Hooks,  Up: Debugging Info
  478. File Names in DBX Format
  479. ------------------------
  480. `DBX_WORKING_DIRECTORY'
  481.      Define this if DBX wants to have the current directory recorded in
  482.      each object file.
  483.      Note that the working directory is always recorded if GDB
  484.      extensions are enabled.
  485. `DBX_OUTPUT_MAIN_SOURCE_FILENAME (STREAM, NAME)'
  486.      A C statement to output DBX debugging information to the stdio
  487.      stream STREAM which indicates that file NAME is the main source
  488.      file--the file specified as the input file for compilation.  This
  489.      macro is called only once, at the beginning of compilation.
  490.      This macro need not be defined if the standard form of output for
  491.      DBX debugging information is appropriate.
  492. `DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (STREAM, NAME)'
  493.      A C statement to output DBX debugging information to the stdio
  494.      stream STREAM which indicates that the current directory during
  495.      compilation is named NAME.
  496.      This macro need not be defined if the standard form of output for
  497.      DBX debugging information is appropriate.
  498. `DBX_OUTPUT_MAIN_SOURCE_FILE_END (STREAM, NAME)'
  499.      A C statement to output DBX debugging information at the end of
  500.      compilation of the main source file NAME.
  501.      If you don't define this macro, nothing special is output at the
  502.      end of compilation, which is correct for most machines.
  503. `DBX_OUTPUT_SOURCE_FILENAME (STREAM, NAME)'
  504.      A C statement to output DBX debugging information to the stdio
  505.      stream STREAM which indicates that file NAME is the current source
  506.      file.  This output is generated each time input shifts to a
  507.      different source file as a result of `#include', the end of an
  508.      included file, or a `#line' command.
  509.      This macro need not be defined if the standard form of output for
  510.      DBX debugging information is appropriate.
  511. File: gcc.info,  Node: SDB and DWARF,  Prev: File Names and DBX,  Up: Debugging Info
  512. Macros for SDB and DWARF Output
  513. -------------------------------
  514. `SDB_DEBUGGING_INFO'
  515.      Define this macro if GNU CC should produce COFF-style debugging
  516.      output for SDB in response to the `-g' option.
  517. `DWARF_DEBUGGING_INFO'
  518.      Define this macro if GNU CC should produce dwarf format debugging
  519.      output in response to the `-g' option.
  520. `PUT_SDB_...'
  521.      Define these macros to override the assembler syntax for the
  522.      special SDB assembler directives.  See `sdbout.c' for a list of
  523.      these macros and their arguments.  If the standard syntax is used,
  524.      you need not define them yourself.
  525. `SDB_DELIM'
  526.      Some assemblers do not support a semicolon as a delimiter, even
  527.      between SDB assembler directives.  In that case, define this macro
  528.      to be the delimiter to use (usually `\n').  It is not necessary to
  529.      define a new set of `PUT_SDB_OP' macros if this is the only change
  530.      required.
  531. `SDB_GENERATE_FAKE'
  532.      Define this macro to override the usual method of constructing a
  533.      dummy name for anonymous structure and union types.  See
  534.      `sdbout.c' for more information.
  535. `SDB_ALLOW_UNKNOWN_REFERENCES'
  536.      Define this macro to allow references to unknown structure, union,
  537.      or enumeration tags to be emitted.  Standard COFF does not allow
  538.      handling of unknown references, MIPS ECOFF has support for it.
  539. `SDB_ALLOW_FORWARD_REFERENCES'
  540.      Define this macro to allow references to structure, union, or
  541.      enumeration tags that have not yet been seen to be handled.  Some
  542.      assemblers choke if forward tags are used, while some require it.
  543. File: gcc.info,  Node: Cross-compilation,  Next: Misc,  Prev: Debugging Info,  Up: Target Macros
  544. Cross Compilation and Floating Point
  545. ====================================
  546.    While all modern machines use 2's complement representation for
  547. integers, there are a variety of representations for floating point
  548. numbers.  This means that in a cross-compiler the representation of
  549. floating point numbers in the compiled program may be different from
  550. that used in the machine doing the compilation.
  551.    Because different representation systems may offer different amounts
  552. of range and precision, the cross compiler cannot safely use the host
  553. machine's floating point arithmetic.  Therefore, floating point
  554. constants must be represented in the target machine's format.  This
  555. means that the cross compiler cannot use `atof' to parse a floating
  556. point constant; it must have its own special routine to use instead.
  557. Also, constant folding must emulate the target machine's arithmetic (or
  558. must not be done at all).
  559.    The macros in the following table should be defined only if you are
  560. cross compiling between different floating point formats.
  561.    Otherwise, don't define them.  Then default definitions will be set
  562. up which use `double' as the data type, `==' to test for equality, etc.
  563.    You don't need to worry about how many times you use an operand of
  564. any of these macros.  The compiler never uses operands which have side
  565. effects.
  566. `REAL_VALUE_TYPE'
  567.      A macro for the C data type to be used to hold a floating point
  568.      value in the target machine's format.  Typically this would be a
  569.      `struct' containing an array of `int'.
  570. `REAL_VALUES_EQUAL (X, Y)'
  571.      A macro for a C expression which compares for equality the two
  572.      values, X and Y, both of type `REAL_VALUE_TYPE'.
  573. `REAL_VALUES_LESS (X, Y)'
  574.      A macro for a C expression which tests whether X is less than Y,
  575.      both values being of type `REAL_VALUE_TYPE' and interpreted as
  576.      floating point numbers in the target machine's representation.
  577. `REAL_VALUE_LDEXP (X, SCALE)'
  578.      A macro for a C expression which performs the standard library
  579.      function `ldexp', but using the target machine's floating point
  580.      representation.  Both X and the value of the expression have type
  581.      `REAL_VALUE_TYPE'.  The second argument, SCALE, is an integer.
  582. `REAL_VALUE_FIX (X)'
  583.      A macro whose definition is a C expression to convert the
  584.      target-machine floating point value X to a signed integer.  X has
  585.      type `REAL_VALUE_TYPE'.
  586. `REAL_VALUE_UNSIGNED_FIX (X)'
  587.      A macro whose definition is a C expression to convert the
  588.      target-machine floating point value X to an unsigned integer.  X
  589.      has type `REAL_VALUE_TYPE'.
  590. `REAL_VALUE_RNDZINT (X)'
  591.      A macro whose definition is a C expression to round the
  592.      target-machine floating point value X towards zero to an integer
  593.      value (but still as a floating point number).  X has type
  594.      `REAL_VALUE_TYPE', and so does the value.
  595. `REAL_VALUE_UNSIGNED_RNDZINT (X)'
  596.      A macro whose definition is a C expression to round the
  597.      target-machine floating point value X towards zero to an unsigned
  598.      integer value (but still represented as a floating point number).
  599.      x has type `REAL_VALUE_TYPE', and so does the value.
  600. `REAL_VALUE_ATOF (STRING, MODE)'
  601.      A macro for a C expression which converts STRING, an expression of
  602.      type `char *', into a floating point number in the target machine's
  603.      representation for mode MODE.  The value has type
  604.      `REAL_VALUE_TYPE'.
  605. `REAL_INFINITY'
  606.      Define this macro if infinity is a possible floating point value,
  607.      and therefore division by 0 is legitimate.
  608. `REAL_VALUE_ISINF (X)'
  609.      A macro for a C expression which determines whether X, a floating
  610.      point value, is infinity.  The value has type `int'.  By default,
  611.      this is defined to call `isinf'.
  612. `REAL_VALUE_ISNAN (X)'
  613.      A macro for a C expression which determines whether X, a floating
  614.      point value, is a "nan" (not-a-number).  The value has type `int'.
  615.      By default, this is defined to call `isnan'.
  616.    Define the following additional macros if you want to make floating
  617. point constant folding work while cross compiling.  If you don't define
  618. them, cross compilation is still possible, but constant folding will
  619. not happen for floating point values.
  620. `REAL_ARITHMETIC (OUTPUT, CODE, X, Y)'
  621.      A macro for a C statement which calculates an arithmetic operation
  622.      of the two floating point values X and Y, both of type
  623.      `REAL_VALUE_TYPE' in the target machine's representation, to
  624.      produce a result of the same type and representation which is
  625.      stored in OUTPUT (which will be a variable).
  626.      The operation to be performed is specified by CODE, a tree code
  627.      which will always be one of the following: `PLUS_EXPR',
  628.      `MINUS_EXPR', `MULT_EXPR', `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'.
  629.      The expansion of this macro is responsible for checking for
  630.      overflow.  If overflow happens, the macro expansion should execute
  631.      the statement `return 0;', which indicates the inability to
  632.      perform the arithmetic operation requested.
  633. `REAL_VALUE_NEGATE (X)'
  634.      A macro for a C expression which returns the negative of the
  635.      floating point value X.  Both X and the value of the expression
  636.      have type `REAL_VALUE_TYPE' and are in the target machine's
  637.      floating point representation.
  638.      There is no way for this macro to report overflow, since overflow
  639.      can't happen in the negation operation.
  640. `REAL_VALUE_TRUNCATE (MODE, X)'
  641.      A macro for a C expression which converts the floating point value
  642.      X to mode MODE.
  643.      Both X and the value of the expression are in the target machine's
  644.      floating point representation and have type `REAL_VALUE_TYPE'.
  645.      However, the value should have an appropriate bit pattern to be
  646.      output properly as a floating constant whose precision accords
  647.      with mode MODE.
  648.      There is no way for this macro to report overflow.
  649. `REAL_VALUE_TO_INT (LOW, HIGH, X)'
  650.      A macro for a C expression which converts a floating point value X
  651.      into a double-precision integer which is then stored into LOW and
  652.      HIGH, two variables of type INT.
  653. `REAL_VALUE_FROM_INT (X, LOW, HIGH)'
  654.      A macro for a C expression which converts a double-precision
  655.      integer found in LOW and HIGH, two variables of type INT, into a
  656.      floating point value which is then stored into X.
  657.